home *** CD-ROM | disk | FTP | other *** search
/ MacWorld UK 2000 March / MW_UK_2000_03.iso / Shareware World / Utilities / Text Processing / Alpha / Help / Alpha Commands < prev    next >
Encoding:
Text File  |  1999-11-09  |  37.0 KB  |  705 lines  |  [TEXT/ALFA]

  1. ==============================================================================
  2. = Alpha Commands
  3. ==============================================================================
  4.  
  5. In this list of routines, text between '<' and '>' is a placeholder for a 
  6. required parameter, text between '[' and ']' is a placeholder for an 
  7. optional parameter, and the '|' signifies a choice of two or more 
  8. alternatives.  A '+' signifies that the previous symbol can be present one 
  9. or more times, while a '*" means zero or more times.  Some commands have no 
  10. parameters, and are only expected to be called interactively.
  11.  
  12.  
  13.  
  14. The following are Alpha-specific tcl routines:
  15.  
  16. • abbrev <label> <string> [<mode>] - register a label for <string>. See 
  17. 'execAbbrev'.
  18. • abortEm - aborts whatever is currently happening
  19. • addAlphaChars <chars> - Add <chars> to the list of characters that internally 
  20.   are caught by the 'isalnum' and 'isalpha' calls. Can be used to augment 
  21.   the list of characters that the \w pattern in a regular expression 
  22.   responds to. Use w/ care.
  23. • addMenuItem [-m] [-l <meta-characters>] <menu name> <item name> - Convert
  24.   item to menu form and add to specified menu. If '-m' specified, menu 
  25.   form conversion not done. The '-l' option allows you to use menu meta 
  26.   characters as text of menu items. If the '-l' option is used, the 
  27.   <meta-characters> string is interpreted for menu item attributes, and 
  28.   meta-characters in <item name> are included in the menu item text 
  29.   literally. For example: 
  30.       addMenuItem -m -l "/B" "Hello/C" 
  31.   would appear as the text "Hello/C" in the menu, and have "B" as its 
  32.   command equivalent.
  33. • AEBuild [<flags>] <app (name|creator)> <aesuite> <aeevent> [<event parameters>]*  -
  34.   Build and send an apple-event. 'AEBuild' is apple's code of the same 
  35.   name. Each "event parameter" is two parameters, a parameter type and 
  36.   the data for the parameter. See the AEBuild doc for more details, 
  37.   :Tcl:SystemCode:think.tcl for examples. The flags are '-r' (wait for reply), 
  38.   '-q' (queue reply, in which case 'handleReply' (in appleEvents.tcl) is 
  39.   called with the reply as a parameter, and '-t <timeout>' specifies the 
  40.   timeout in ticks.
  41. • alertnote message_string
  42.   This command will display message_string in a standard Macintosh alert box.
  43. • alphaHelp - display Alpha help.
  44. • ascii (see bindings).
  45. • askyesno [-c] prompt
  46.   This command will display a Macintosh alert box with 'prompt' displayed
  47.   with the push buttons Yes and No. The command will return the 
  48.   string "yes" or "no". The '-c' flag specifies that a cancel button be 
  49.   used as well.
  50. • backSpace - delete selection, or a single char if no selection.
  51. • backwardChar - moves insertion one char back
  52. • backwardCharSelect - extends selection one char back
  53. • backwardDeleteWord - deletes previous word
  54. • backwardWord - moves insertion one word back
  55. • balance - selects smallest set of parens, braces, or 
  56.   brackets that encloses the current selection
  57. • beep [-volume num] [-list | sndName]?
  58.   where -volume and -list are switches, while num and sndName are variables.
  59.   Ex:  beep -volume 3 "click in set 5"  play at volume 3 the sound named
  60.   "click in set 5" in the Alpha's snd resource.
  61.   Any sound stored in that resource can be used as well, so feel free to
  62.   paste a sound (with ResEdit) in the snd resource to have it available.
  63. • beginningBufferSelect - extend selection to the 
  64.   beginning of the buffer
  65. • beginningLineSelect - extend selection to the 
  66.   beginning of the line
  67. • beginningOfBuffer - move insertion to the beginning 
  68.   of the buffer
  69. • beginningOfLine - move insertion to the beginning of 
  70.   the line
  71. • Bind  (see bindings)
  72. • blink <pos> - blink cursor at 'pos'
  73. • breakIntoLines <string> - return 'string' with 
  74.   carriage returns and spaces inserted to satisfy 
  75.   'leftFillColumn' and 'fillColumn' variables.
  76. • bringToFront <winName> - Bring named window to front.
  77. • buttonAlert <prompt> [<button>…] - Create a dialog w/ the specified 
  78.   buttons, returning the one selected.
  79. • capitalizeRegion - capitalize first word in selected region 
  80. • capitalizeWord - capitalize word and move to its end
  81. • centerRedraw - redraw window with current line in 
  82.   the middle.
  83. • clear - clear selected text
  84. • closeAll - close all windows
  85. • colorTriple [<prompt>] [<red> <green> <blue>] - Prompts user to choose 
  86.   color. If specified, the input RGB value is used as the initial color on 
  87.   the colorpicker.
  88. • copy - copy region
  89. • cp <fromName>+ <toName>
  90.   This command will copy the file fromName and name the new file toName, 
  91.   overwriting any existing file. This command copies both data forks, and 
  92.   the Finder information.  'file copy' is the prefered means of carrying
  93.   out copies in Alpha 7.0 or newer.
  94. • createTagFile - searches all files in current file set 
  95.   and saves the locations of any function declarations
  96.   in a file called 'cTAGS'.
  97. • createTMark <name> <pos> - create a temporary 'mark' 
  98.   at location 'pos'. 
  99. • currentPosition - displays current and total bytes.
  100. • cut - deletes and saves region
  101. • deleteChar - delete char AFTER cursor
  102. • deleteMenuItem [-m] <menu name> <item name> - Convert item to menu form 
  103.   and delete from specified menu. If '-m' specified, menu form conversion 
  104.   not done. 
  105. • deleteModeBindings <mode> - Delete all bindings for specified mode.
  106. • deleteSelection - delete current position, don't save
  107. • deleteWord - delete word after cursor
  108. • describeBinding - display the binding of the next typed key sequence. 
  109. • deleteText <pos1> <pos2> - remove text between 'pos1' 
  110.   and 'pos2'
  111. • dialog [<-w width>|<-h height>|<-b title l t r b>|<-c title val l t r b>|
  112.             <-t text l t r b>|<-e text l t r b>|<-r text val l t r b>|
  113.             <-p l t r b>]+ 
  114.   Create and display a dialog.  '-w' and '-h' allow width and height of 
  115.   dialog window to be set.  '-b', '-c', '-r', '-t', '-e' and '-p' allow 
  116.   buttons, checkboxes, radio buttons, static text, editable text and gray 
  117.   outlines to be created, respectively.  All control types (except gray 
  118.   outlines) require specification of a title or text, together with left, 
  119.   top, right, and bottom coordinates.  Checkboxes and radioboxes have an 
  120.   additional parameter, the default value.  At least one button must be 
  121.   specified.  The return value is a list containing resulting values for 
  122.   all buttons, radioboxes, checkboxes, and editable textboxes (static text 
  123.   is ignored).  Buttons have value '1' if chosen, '0' otherwise.  The 
  124.   dialog box exits at the first button press.
  125.  
  126. • dirs - show current directory stack. See 'pushd' and 'popd'.
  127. • display [-w <win>] <pos> - move pos's line to top of screen.
  128. • displayMode <mode> - Up to four characters of the 'mode' string are 
  129.   displayed in the status line at the bottom of a window.
  130. • dosc [<-c 'sign' | -n appName>] [-k 'clas'] [-e 'evnt'] <-s string | -f fileName> [<-t timeout|-r>]
  131.   Send an AppleEvent, by default class 'misc', event 'dosc'.
  132.    -c 'sign' 
  133.            "sign" is a four-letter creator signature of a running application.
  134.    -n appName
  135.            "appName" is the name of a running application.
  136.    -k 'clas'
  137.            "clas" is a four-letter event class.
  138.    -e 'evnt'
  139.            "evnt" is a four-letter event class.
  140.    -s string
  141.            "string" is the text of a script to send to the other app.
  142.    -f fileName
  143.            "fileName" is the complete or relative pathname of a file the other 
  144.            application should execute.
  145.    -t timeout
  146.            "timeout" is the number of ticks Alpha should wait for a response. A 
  147.            timeout of "0" means wait forever.
  148.    -r
  149.            Do not wait for reply.
  150.    -q
  151.            Queue reply.
  152.            
  153.    If neither of the '-c' and '-n' options is chosen, the PPC Browser is 
  154.    used. Either '-s' or '-f' must be chosen. Thus, you can have "Alpha 
  155.    5.02" and "Alpha 5.02 Copy" sending Apple events to each other, or they 
  156.    can send events to a remote server such as Apple's ToolServer. 
  157.    "$HOME:Tcl:UserCode:createStuffitArchive.tcl" contains examples of 
  158.    controlling Stuffit Deluxe via this command.
  159. • downcaseRegion - changes all uppercase letters to 
  160.   lowercase in current region
  161. • downcaseWord - changes all uppercase letters to 
  162.   lowercase in current word
  163. • dumpColors - dump current foreground and background
  164.   colors into the current buffer in Alpha-readable
  165.   format.
  166. • echo <string>* - echo the strings (used 
  167.   in shells).
  168. • edit [-r] [-m] [-c] [-w] [-g <l> <t> <w> <h>] <name> - Open a file in new 
  169.   window. '-c' means don't prompt for duplicate win if file already open.
  170.   '-r' means open the file read-only. '-m' means omit the function titlebar 
  171.   menu and present only the marks titlebar menu, which is labeled with the 
  172.   contents of 'markLabel'. The '-g' option allows left and top coords to 
  173.   be specified, plus width, and height. All or none. '-w' allows you to
  174.   bypass the "Wrap" dialog for files with long rows.
  175. • enableMenuItem <menuName> <item text> <on|off> - Either enable or 
  176.   disable the menu item of user menu 'menuName' that has text '<item 
  177.   text>'. Note that unless the menu is not only created, but also already
  178.   inserted, this command has no effect. 
  179. • endBufferSelect - extend selection to the end of the 
  180.   buffer
  181. • endKeyboardMacro - stop recording keyboard macro
  182. • endLineSelect - extend selection to the end of line
  183. • endOfBuffer - move insertion to the end of the buffer
  184. • endOfLine - move insertion to the end of the line
  185. • enterReplaceString - use current selection, if any, for future 
  186.   replacements (in search dialog).
  187. • enterSearchString - use current selection, if any, for future searches.
  188. • evaluate - evaluates hilited text, or entire window if 
  189.   nothing is hilited. 'evaluat'ing means that whatever 
  190.   bindings or macro definitions are present in the 
  191.   evaluated text take effect
  192. • eventHandler [class] [event] [proc] - Register 'proc' to handle the class 
  193.   and event specified. Class and event are each 4 char args. 'proc' takes 
  194.   a single argument that specifies the incoming event according to the 
  195.   syntax here. There is currently no provision for a reply.
  196. • exchangePointAndMark - exchange the current 'mark' 
  197.   w/ the current insertion point
  198. • execAbbrev - looks at current word and tries to expand it. Labels are 
  199.   specified using 'abbrev'.
  200. • execute - prompt user for a function or macro. The 
  201.   tab key acts as a "completion" command.
  202. • executeKeyboardMacro - execute the current keyboard 
  203.   macro
  204. • fileInfo - prompts for a file, and displays type, 
  205.   creator, sizes of both data and resource forks, last
  206.   modification time, and creation time
  207. • fileRemove - prompts for a file, and removes it
  208. • find - bring up the find dialog
  209. • findAgain - repeat search forward
  210. • findAgainBackward - repeat search backward
  211. • findFile [<path>] - open a file in a new window. An optional path parameter
  212.   specifies a default directory or file.
  213. • findInNextFile - search next file.
  214. • findTag - prompt user for a function name and attempt 
  215.   to use the file 'cTAGS' to locate the function's 
  216.   definition
  217. • float -m <menu> [<-h|-w|-l|-t|-M> <val>] [-n winname] [-z tag] -
  218.   Takes a created menu (not necessarily in the menubar), and makes a 
  219.   floating window out of it. Returns integer tag that is used to remove 
  220.   the window. NOT DYNAMIC!  W/ no options returns all currently defined menus.
  221.   Displayed w/ system floating window WDEF if system 7.5, plainDBox 
  222.   otherwise. -h through -M change width, height, left margin, top margin, and
  223.   margin between buttons. -z allows a ten-char tag to be specified for 
  224.   'floatShowHide'.
  225. • floatShowHide <on|off> <tag> - Shows or hides all floats w/ specified 
  226.   tag. Tags of current modes are automatically shown/hidden.
  227. • forwardChar - move insertion one character forward
  228. • forwardCharSelect - extend selection one character 
  229.   forward
  230. • forwardWord - move insertion one word forward
  231. • freeMem - give a rough approximation of the current 
  232.   memory reserves of ALPHA
  233. • get_directory [-p <prompt>]
  234.   This command will display a standard Macintosh file dialog and request the user 
  235.   select a folder. The command will return the selected folder's full path name, or an 
  236.   error if the Cancel button was selected.
  237. • getAscii - displays the ASCII code for character at 
  238.   current insertion point
  239. • getChar - waits for a keystroke, returns ascii.
  240. • getModifiers - returns current modifiers mask. "OR" of several values, 
  241.     cmdKey                        = 0x01,                        /* Bit 0 of high byte */
  242.     shiftKey                    = 0x02,                        /* Bit 1 of high byte */
  243.     alphaLock                    = 0x04,                        /* Bit 2 of high byte */
  244.     optionKey                    = 0x08,                        /* Bit 3 of high byte */
  245.     controlKey                    = 0x10,                        /* Bit 4 of high byte */
  246.     rightShiftKey                = 0x20,                        /* Bit 5 of high byte */
  247.     rightOptionKey                = 0x40,                        /* Bit 6 of high byte */
  248.     rightControlKey                = 0x80,                        /* Bit 7 of high byte */
  249. • getColors - returns list of colors/hypertext for current document. 
  250.   Format is list of lists, each sublist consisting of file offset, color 
  251.   index, and possibly a hypertext command.
  252. • getfile [<prompt>] [<path>]
  253.   This command will display an SFGetFile() and return the full path name of the 
  254.   selected file, or an error if CANCEL button was selected.  An optional path 
  255.   parameter specifies a default directory or file.
  256. • getFileInfo <file> <arr> - Given a file name, creates an array called 
  257.   'arr' in the current context, containing fields 'created', 'creator', 
  258.   'modified', 'type', 'datalen', and 'resourcelen'. 'created' and 
  259.   'modified' are in a form suitable for the command 'mtime'.
  260. • getGeometry [win] - return a TCL list containing the left 
  261.   edge of the current window, the top, the width, and height.
  262. • getline <prompt> <default>
  263.   This command will display a Macintosh alert box with prompt displayed, a 
  264.   text edit field with default initially in the field, and with the push 
  265.   buttons OK, Cancel.. The command will return the text entered into the 
  266.   text edit field by the user, or an empty string if the user selected the 
  267.   Cancel button. 
  268. • getMainDevice - return a list containing the left, top, right, and 
  269.   bottom of the rectangle defining the main device.
  270. • getMark - return the current mark.
  271. • getNamedMarks [-w <win>] [-n] - 
  272.   return list of all permanent marks in open files. Each
  273.   element of a list describes one mark as a sublist of the mark's name, 
  274.   the complete pathname of the mark's file, the position of the first 
  275.   character in the first line displayed, the current position, and the 
  276.   end of the selection if text is hilited, or the current position again 
  277.   if there is no hilited section. '-w' allows window name to be applied 
  278.   as filter, '-n' means only names will be returned.
  279. • getPathName - prompt the user with an SFGetFile dialog and return 
  280.   complete pathname.
  281. • getPos [-w <win>] - return the current insertion point
  282. • getScrap - returns system TEXT scrap.
  283. • getSelect - return the currently selected text, if 
  284.   any.
  285. • getText [-w <win>] <pos1> <pos2> - return the text between 'pos1' 
  286.   and 'pos2'. '-w' can be used to specify a window.
  287. • getTMarks - Return a list of temporary marks. Each item of the returned 
  288.   list is a sublist containing the mark name, the complete pathname of the 
  289.   mark, and the start and finish of the selection named by the mark. The 
  290.   following is an example of the result: 
  291.  
  292.     {{temp1 External:file.c 1312 1315} {temp2 Internal:it.h 111 111}} 
  293.  
  294. • getWinInfo [-w <win>] <arr> - Creates an array in current context 
  295.   containing info about either the current or a specified window. Array 
  296.   has fields 'state', 'platform', 'read-only', 'tabsize', 'split', 
  297.   'linesdisp' (num lines that can be seen in the window), 'currline' 
  298.   (first line displayed), and 'dirty'.
  299. • glob [-i] [-t <TYPE>] [-c <CRTR>]
  300.   The original glob provided by the UNIX version of tcl was not quite 
  301.   adequate for the more complex Macintosh file system. Issues such as 
  302.   invisible file handling, Finder type and creator filtering, and space 
  303.   handling in file names. Release 6 of tcl has dealt with the original 
  304.   problem with spaces in filenames, but the following options are provided 
  305.   to deal with additional Macintosh issues. 
  306.  
  307. Anyway, the new glob now takes several options. They are:
  308.     -i    This option causes glob to list invisible files also.
  309.     -t TYPE    This option causes glob to only list file with the 
  310.         indicated Finder file typeTYPE. This option may be 
  311.         used with the -c option.
  312.     -c CRTR    This option causes glob to only list file with the 
  313.         indicated Finder file creatorCRTR. This option may 
  314.         be used with the -t option.
  315.         Also note that the original glob would skip dot files
  316.         (i.e., file names the begin with a period) 
  317.         in the listing, unless the pattern began with a period.
  318.         Tickle extends this concept one step further on the
  319.         Macintosh, and skips spot files (i.e., file names that 
  320.         begin with '•'), unless the pattern starts with a spot.
  321. • goto <pos> - goto the position 'pos'.
  322. • gotoMark - goto named mark, use 'mark' in macros.
  323. • gotoTMark <name> - goto the temporary mark 'name'.
  324. • icon [-f <winName>] [-c|-o|-t|-q] [-g <h> <v>] - Having to do w/ 
  325.   iconifying windows. '-c' means close (iconify) window, '-o' open, '-t' 
  326.   toggle open/close, '-q' returns either a '1' for an iconified window or a 
  327.   '0' for an uniconified window, and '-g' moves the icon to horizontal 
  328.   position <h> and vertical position 'v'. Options are executed as they 
  329.   are parsed, so the '-f' option, if present, should always be first. 
  330. • icURL <URL> - passes arg to Internet Config, if present. Error if not 
  331.   present. 
  332. • icGetPref [<-t <type>] <pref name> - Gets preference from 
  333.   Internet Config. '-t' allows type to be set, '0' returns a string 
  334.   (default), '1' returns a path name, commonly used for helper apps. A 
  335.   <pref name> of 'all' returns all valid preferences.
  336. • icOpen - Opens Internet Config
  337. • insertAscii - prompts for an ASCII code and inserts
  338.   into text.
  339. • insertColorEscape <pos> <color ind> [hypertext func] - Create a color 
  340.   or style "point" for documentation purposes. Look at the file 
  341.   "docColors.tcl" for examples. The hypertext func is only used when the 
  342.   "point" is underline. See 'getColors' for info about the current file.
  343. • insertFile - prompts for a file name and inserts the
  344.   corresponding file into the current window. Not
  345.   undoable.
  346. • insertMenu <name> - insert the previously created user menu 'name' into 
  347.   the menuBar. 
  348. • insertPathName - present the user w/ a SFGetFIle dialog 
  349.   and paste the complete path-name of the chosen file
  350.   into the current window
  351. • insertText [-w <win name>] <text>* - Insert 'text' at the current 
  352.   insertion point. Mark is unchanged.
  353. • insertToTop - make the line that the insertion point 
  354.   is on the first line shown, and display the current 
  355.   line number along w/ the total number of lines in file
  356. • isearch - incremental search: searches w/o a dialog,
  357.   searches as you type the search pattern. Does not do
  358.   regular expression searches. 'matchWords' 
  359.   automatically set to false.
  360. • iterationCount - allows actions to be repeated many times. "control-u 44 
  361.   =" inserts 44 '='s into current window.  Also can be used to execute any 
  362.   function or macro (including the keyboard macro) many times.  Defaults to 
  363.   4.
  364. • keyAscii - insert ascii representation (in decimal)
  365.   of the keydown event, plus a modifier string, if 
  366.   necessary.
  367. • keyCode - insert the key code along w/ a string 
  368.   representing and modifiers into the current window.
  369.   Can be used to create bindings in 'Alphabits'.
  370. • killLine - kill text from insertion point to the end 
  371.   of the line. If the line has no text, delete the line 
  372.   and move succeeding lines up one.
  373. • killWindow - kill current window
  374. • largestPrefix <list> - Returns the longest prefix contained in all 
  375.   strings of 'list'.
  376. • launch -f <name> - launch the named app into the background. Note that 
  377.   for some yet unexplained reason, some applications (MicroSoft Word) 
  378.   won't launch completely in the background. 'launch'ing such 
  379.   applications won't insert the application into any system menu that 
  380.   specifies running applications (although "About the Finder..." will 
  381.   list it. The only way to get to such an app is through Alpha's 
  382.   'switchTo', after which the application will finish launching. The '-f' 
  383.   option gets around this by launching the application in the foreground 
  384.   instead.
  385. • lineStart <pos> - return the position of the start of
  386.   the line 'pos' is on.
  387. • listpick [-p <prompt>] [-l] [-L <def list>] <list>
  388.   This command will display a dialog with the list displayed in a List Manager 
  389.   list. If the user presses the Cancel button, an empty string is returned. If 
  390.   the user selects the Open button, or double clicks an item in the list, that 
  391.   item will be returned. If '-l' is specified, than the return is a list of 
  392.   items.
  393. • lookAt [-w <name>] <pos> - return the 'pos'th character of the 
  394.   current file, or the file named by <name> if the '-w' option is specified.
  395. • markHilite - This is the 'Hilite' from the 'Edit'
  396.   menu. If there is a currently hilited selection, the 
  397.   selection is unhilited, leaving the mark and the 
  398.   insertion point around the old selection. If there 
  399.   is not a selection, the region between the insertion 
  400.   point and the mark is selected.
  401. • markMenuItem [-m] <menuName> <item text> <on|off> [<mark char>] - Either mark or unmark
  402.   the menu item of user menu 'menuName' that has text '<item text>'. 
  403.   Note that unless the menu is not only created, but also already
  404.   inserted, this command has no effect. 
  405. • matchBrace - moves the insertion point to the 
  406.   character that matches the character after the current 
  407.   insertion point
  408. • matchIt <brace char> <pos> [<limit>] - Return pos of matching brace. Recognizes 
  409.   parenthesis, square brackets, and curly braces. Optional third argument 
  410.   specifies how many characters to search.
  411. • minPos - returns the first position in the current window.  This will
  412.   normally be '0', but for future compatibility should not be so assumed.
  413. • maxPos [-w <win>] - returns the position of the last character in the front
  414.   window.
  415. • Menu [-s] [-n <name>] [-i <num] [-m] [-M <mode>] [-p <procname>] <list of menu items> - 
  416.   Defines a new menu named 'name' (if provided w/ '-n' option). The menu is not 
  417.   yet inserted into the menubar. The menu commands may be nested for 
  418.   heirarchical menus, see 'AlphaBits.tcl' for examples. Alpha massages the 
  419.   function names to make them look better in the menus. 
  420.   '-c'            Ignore any menu meta-chars. Can also be done on a per-item basis 
  421.                   by appending an ampersand ('&') to the end of an item.
  422.   '-s'            Use system menu definition proc (faster).
  423.   '-n <num>'    Resource id of icon suite to use for menu title. 'ics#' 
  424.                 is the only resource that is really necessary.
  425.   '-n <name>'    Name the menu. Not necessary for submenus.
  426.   '-m'            No menu form. If not supplied, each menu item is split into 
  427.                   words at each capitalized letter.
  428.   '-p <name>'     The tcl proc named by 'name' is called w/ the menu's name
  429.                   and the item's contents when the item is chosen.
  430.   '-M <mode>'    Specifies that any bindings created by the menu are 
  431.                   specific to a given mode. This is important because mode-specific
  432.                   bindings over-ride global bindings.
  433. • message <string> - prints 'string' on the status line.
  434. • mkdir <name> - creates a directory (folder) named 
  435.   'name' in the current directory.
  436. • mousePos - Returns list <row,col> of mouse position, if the mouse is 
  437.   currently over the active window. Otherwise, return error (catch w/ 
  438.   'catch').
  439. • moveInsertionHere [-last] - move the insertion point to the 
  440.   first (or last) line displayed
  441. • moveFile <fromName> <toName>
  442.   This command will move the file fromName to toName, overwriting any 
  443.   existing file. The move can not be made across volume (disk drives) 
  444.   boundaries. 
  445. • moveWin [win name] <left> <top> - moves current or specified window. 
  446.   The window name can be "StatusWin".
  447. • mtime <time> [long|short|abbrev]
  448.   Returns a date and time string using the Macintosh International Utilities. The 
  449.   long/short/abbrev specification corresponds to the date. These are the following 
  450.   formats:
  451.     short        3/16/92 9:20:46 PM
  452.     abbrev    Mon, Mar 16, 1992 9:20:49 PM
  453.     long        Monday, March 16, 1992 9:20:43 PM
  454.   The returned value actually is in the form of a list. To get text as 
  455.   above, run the result through 'join', as in "join [mtime [now] short]".
  456. • nameFromAppl '<app sig>' - Interrogates the desktop database for the first 
  457.   existing app that has the desired signature. <app sig> is four chars 
  458.   inside single quotes.
  459. • new [-g <l> <t> <w> <h>] [-n <name>] - opens an untitled window. Can optionally 
  460.   provide left and top coordinates, plus width and height. All or none.
  461. • nextLine - move insertion point to next line
  462. • nextLineSelect - extend selection to the next line
  463. • nextLineStart <pos> - return the position of the start 
  464.   of the next line after position 'pos'.
  465. • nextSentence - go to next sentence ("fill.tcl").
  466. • nextWindow - select next window
  467. • now
  468.   Returns the current time as Macintosh seconds. This is the number of seconds that 
  469.   have elapsed since Midnight Jan 1, 1904.
  470. • oneSpace - converts whitespace surrounding insertion
  471.   into a single space.
  472. • openLine - insert a new line following the current 
  473.   one and move the insertion point to it
  474. • otherPane - If window is split, select the other pane.
  475. • pageBack - display prev screenful, move the
  476.   insertion point if 'moveInsertion' enabled
  477. • pageForward - display next screenful, move the
  478.   insertion point if 'moveInsertion' enabled
  479. • pageSetup - display the printing PageSetup dialog.
  480. • paste - insert the last chunk of text created by 'cut' 
  481.   or 'copy'
  482. • performSearch  [options…] <pattern> <pos> - as for 'search' but also
  483.   selects the range of characters which are found, and ensures Alpha's
  484.   internal state is consistent for following replace/replaceAll/...
  485.   commands.
  486. • pos::diff <pos1> <pos2> returns the number of characters between the
  487.   two positions in the current window.
  488. • pos::math <pos> ?+/- offset? ...  returns that position which is
  489.   given by moving the given number of characters backwards or forwards
  490.   in the current window.  Any number of offset arguments may be given,
  491.   with or without spaces separating the arguments.  For future compatibility
  492.   pos::math should be used in preference to numerical addition: positions
  493.   cannot be assumed to be simple integers.
  494. • pos::compare <pos1> <comparison> <pos2> returns 1 or 0 depending on
  495.   whether the given comparison is true or not.  Valid comparisons are
  496.   ==, !=, <, >, <=, >= etc.  For future compatibility, pos::compare
  497.   should be used in preference to a direct, numerical comparison.
  498. • popd - Pop top dir off dir stack and 'cd' to it.
  499. • posToRowCol <pos> - converts from absolute position to row, col.
  500. • prefixChar - used to further modify the next keystroke 
  501.   combination, in the same manner as using the shift key 
  502.   in the next keystroke
  503. • previousLine - move insertion point to the previous 
  504.   line
  505. • prevLineSelect - extend selection to the previous line
  506. • prevSentence - go to previous sentence ("fill.tcl").
  507. • prevWindow - select previous window
  508. • print - print front window
  509. • processes - returns info of active processes. A list of lists, each 
  510.   sublist contain a file-name, an application signature, the application 
  511.   memory size, and the number of ticks the application has been active.
  512. • prompt <prompt> <default> [<name> <menu item>*] - prompt dialog to 
  513.   the user with a prompt string and a default value. The prompt dialog can 
  514.   optionally include a popup menu specified by 'name' and the succeeding 
  515.   strings. Selection of the popup menu items inserts the item text into the 
  516.   editable dialog item. 'Prompt' returns the value of the editable item. 
  517.   If the 'Cancel' button is selected, the tcl returns an error and your 
  518.   script will be stopped unless you execute the command from 'catch'.
  519. • pushd [<dir>] - If 'dir' specified, push current folder into directory 
  520.     stack and 'cd' to dir. Otherwise, swap current dir w/ top of dir stack.
  521. • putfile <prompt> <original>
  522.   This command will display an SFPutFile() and return the full path name of the 
  523.   selected file, or an empty string if CANCEL button was selected. Original is the 
  524.   default name displayed for the user.
  525. • putScrap [<string>]+ - Concatenate strings together into the system 
  526.   scrap. The scrap can be appended to through calls of the form 'putScrap 
  527.   [getScrap] " another word"'.
  528. • pwd
  529.   This command will return the current working directory, ending in a colon.
  530. • quit - quits ALPHA
  531. • rectMarkHilite - creates a rectangular selection 
  532.   between the mark and the insertion point.
  533. • redo - redo the next action that has been undone but 
  534.   not redone
  535. • regModeKeywords [options] <mode> <keyword list> - Set keywords and comments that 
  536.   Alpha can recognize to color them. Specifically, in mode <mode>, every 
  537.   keyword specified in the list is colored non-black (blue, by default). 
  538.   Comments, if specified by '-e' or '-b' below, are colored red by defualt.
  539.     -a                                Keywords will be *added* to existing mode
  540.                                     keywords. The new keywords can be a different
  541.                                     color than older keywords. This flag can also be
  542.                                     used to modify other attributes, but it cannot be
  543.                                     used to modify colors of existing keywords.
  544.     -m <c>                            Specify a magic character. Every word beginning with the 
  545.                                     magic character is a keyword.
  546.     -e <commentstr>                    Specify a string that begins comments that last to 
  547.                                     the end of the line. 
  548.     -b <comment beg> <comment end>    Specify a pair of strings that bracket a 
  549.                                     comment.
  550.     -c <color>                        Comment color.
  551.     -k <color>                        Keyword color.
  552.     -s <color>                        String color. Alpha can color single-line
  553.                                     strings only, using the simple heuristic
  554.                                     of assuming the first two double quotes
  555.                                     constitute a string. 
  556.     -i <char>                        Specify a character to display differently.
  557.                                     Commonly used for curly braces, etc.
  558.     -I <color>                        Color of above characters.
  559.     Keywords must be less than 20 characters long.
  560. • removeFile <fileName>
  561.   This command will delete the file or folder 'fileName'.
  562. • removeMenu <name> - remove menu 'name' from menubar, except those 
  563.   specified by previous 'makeMenuPermanent' calls.
  564. • removeTMark <name> - remove temporary mark.
  565. • replace - replace the current selection
  566. • replaceAll - replace all further occurrences in the current file or
  567.   set of files.
  568. • replace&FindAgain - replace the current selection and find next 
  569.   occurrence.
  570. • replaceString [<str>] - specifies replacement string. Returns current 
  571.   replacement string if no arg.
  572. • replaceText ?-w win? <pos1> <pos2> [text]+ - replaces the text
  573.   between 'pos1' and 'pos2' with 'text', where 'text' can be any number 
  574.   of arguments. Leaves insertion at end, mark at beginning of inserted 
  575.   text. 
  576. • restoreVars - restore variables to saved state, 
  577.   see 'saveVars'
  578. • revert ?-w win? - revert the file to its last saved version
  579. • rmdir <dirname> - remove a directory (folder).  'file delete <dirname>' is 
  580.   the prefered means of deleting directories in Alpha 7.0 or newer.
  581. • rowColToPos [-w <win>] <row> <col> - converts to abosolute position.
  582.   Accepts optional -w parameter that allows window to be specified.
  583. • rsearch - reverse incremental search, see 'isearch'.
  584. • save - save current window
  585. • saveAs ?-f? [def name] - save current window with new name. Optionally 
  586.   takes a default filename. Returns complete path of saved file, if ok hit, 
  587.   otherwise TCL_ERROR returned. If '-f' flag given, then we force the save
  588.   without any standard-file dialog.
  589. • saveVars - save variable state, see 'restoreVars'
  590. • scrollDownLine - same action as that which occurs when 
  591.   the down arrow in the vertical scrollbar is selected
  592. • scrollLeftCol - same action as that which occurs when
  593.   the left arrow in the horizontal scrollbar is selected
  594. • scrollRightCol - same action as that which occurs when
  595.   the right arrow in the horizontal scrollbar is 
  596.   selected
  597. • scrollUpLine - same action as that which occurs when 
  598.   the up arrow in the vertical scrollbar is selected
  599. • search  [options…] <pattern> <pos> - 
  600.   -f <num>        - go forward?
  601.   -r <num>        - regular expression?
  602.   -s            - save previous search string and search flags.
  603.   -i <num>        - ignore case?
  604.   -m <num>        - match words?
  605.   -n            - failed search still returns TCL_OK, but null string.
  606.   -l <limit>    - limit on how search goes.
  607.   --             - next arg is the pattern.
  608.  
  609.   Searches for 'pattern' from position 'pos'.  If the search succeeds, a 
  610.   list of two positions will be returned.  The first is the starting position 
  611.   of the match, the second is one past the last character. If no '-n', 
  612.   TCL_ERROR returned.  See also performSearch
  613. • searchString [<str>] - allows search string to be specified. Returns 
  614.   current searchstring if no arg.
  615. • select [-w <win>] <pos1> <pos2> - selects the text between 'pos1' 
  616.   and 'pos2'.
  617. • selEnd [-w <win>] - returns the end of the hilited selection, or 
  618.   the current insertion point if no text is selected.
  619. • sendOpenEvent [filler] <app name> <file name> - Send an open doc event to 
  620.   another currently running application. If 'filler' is noReply, then a 
  621.   reply is not requested. Otherwise, we wait for a reply and 'filler' is 
  622.   ignored. 
  623. • setFileInfo <file> <field> [arg] - Allows some information to be set 
  624.   for files. Settable fields are 'modified', 'created', 'creator', and 'type'.
  625.   All take an argument except 'resourcelen' which just removes the resource fork. 'file' is a complete pathname.
  626. • setFontsTabs - bring up font and tab dialog
  627. • setMark - set the current mark to the insertion point
  628. • setNamedMark [name disp pos end] - set named mark. If optional arguments are 
  629.   present, the mark is created without prompting user. 'disp' is the 
  630.   character position of the start of the first line to be displayed, 
  631.   while 'pos' and 'end' bracket the text to be selected.
  632. • setWinInfo [-w <win>] <field> <arg> - Sets a piece of data about either 
  633.   the current or a specified window. Settable fields 'platform', 'state', 
  634.   'read-only', 'tabsize', 'dirty', and 'shell'. 'shell' means that dirty 
  635.   flag ignored and undo off.
  636. • shell - open the Tcl shell.
  637. • sizeWin [win name] <width> <height> - sets size of current or specified window.
  638.   The window name can be "StatusWin", although only the width can be 
  639.   changed.
  640. • spacesToTabs - convert spaces in selection to tabs
  641. • specToPathName [hex data] - given an FSSpec in hex form (as that 
  642.   returned by aebuild, for instance, see the definition of thinkFileName 
  643.   in :Tcl:SystemCode:think.tcl), return a complete pathname.
  644. • splitWindow [percent] - toggle having window split into two panes. 
  645.   Optional arg specifies percent of window to allocate to the first pane. 
  646. • startEscape - used to further modify the next 
  647.   keystroke combination, in the same manner as using the 
  648.   shift key in the next keystroke
  649. • startKeyboardMacro - start recording keyboard macro
  650. • statusPrompt <prompt> [<func>] - Prompt in the status window. If 'func' 
  651.   is present, call this routine at each key-press with the current 
  652.   contents of the status line and the key, insert into statusline 
  653.   whatever is returned by the func. Command-v pastes the current (<80 
  654.   char) clipboard contents on the status line.
  655. • substituteVars <string> - Takes a single string and
  656.   substitutes for all variables inside it, regardless of
  657.   depth. Unfortunately, you currently need to make 'global var' 
  658.   declarations in the proc you call this for each 'var' that might need 
  659.   to be substituted in the string (see proc.tcl for examples).
  660. • switchTo <appName> - Switches to application 'appName'.
  661. • tab - insert a tab
  662. • tabsToSpaces - convert tabs in selection to spaces.
  663. • ticks
  664.   Returns the current TickCount. Ticks are 60ths of a seconds. TickCount is the 
  665.   number of ticks since the Macintosh was started. The command:
  666.         puts stdout [expr "[ticks] / 60"]
  667.   will print the number of seconds since the Macintosh was booted.
  668. • toggleScrollbar - toggles horizontal scrollbar on frontmost window. 
  669.   Will not succeed if scrollbar scrolled.
  670. • traceFunc on <funcName> <winName> Trace 'funcName', send output to 
  671.                                     'winName'. 
  672.   traceFunc off                        Turn function tracing off.
  673.   traceFunc status                    Display current tracing status.
  674. • unascii  (see bindings)
  675. • unbind  (see bindings)
  676. • undo - undo the last action that has not been undone
  677. • unfloat <float num> - removes specified floating window. W/ no options 
  678.   lists all floating windows.
  679. • upcaseRegion - convert all lowercase letters to 
  680.   uppercase in the current region
  681. • upcaseWord - convert all lowercase letters to 
  682.   uppercase in the current word
  683. • version - Return string of the form "Alpha Version 5.31, Feb. 15, 1993".
  684. • watchCursor - turns the cursor into a a watch cursor.
  685. • wc <file>... - counts chars, words, lines of input files.
  686. • winNames [-f] - return a TCL list of all open windows. If '-f' option 
  687.   specified, complete pathnames are returned.
  688. • wrap - see the section on "Fill" routines.
  689. • wrapText
  690. • xtclcmd [-f filename] <cmdname> [argument_list]*
  691.   This command will load the external command cmdname and pass it the argument 
  692.   list [ cmdname argument_list... ]. External command are code resources of type 
  693.   XTCL. They may be located in the resource fork of the tickle application, or they 
  694.   may be located in a file named XTCL File in the same directory as the tickle 
  695.   application. If the optional -f filename is included, the external command will first 
  696.   be loaded from filename before the other two files.
  697.   See the appendix for a detailed description of the external tcl command interface. 
  698.   See the accompanying sources for an example of writing an XTCL.
  699. • yank - insert the last piece of deleted text of less
  700.   than 1k. Consecutive deletes are concatenated.
  701.   together.
  702. • zapInvisibles - removes chars < ascii 32, except for
  703.   LF's and CR's.
  704. • zoom - zooms the current window
  705.